import Vue from "vue";
import VueRouter from "vue-router";
// import index from '../views/index.vue';
// import blog from '../views/blog';


import Homepage from '../views/homepage'
import Blog from '../views/blog'
import Myblog1 from '../views/myblog1'
import Myblog2 from '../views/myblog2'
import Read from '../views/read'
import Read1 from '../views/read1'
import Read2 from '../views/read2'
import Read3 from '../views/read3'
import Read4 from '../views/read4'
import Read5 from '../views/read5'
import Read6 from '../views/read6'
import Read7 from '../views/read7'
import Show from '../views/show'


import concat from "../views/concat";
import myBlog from '../views/myblog';
import draftBox from '../views/aboutMyblog/draftBox';
import myAccount from '../views/aboutMyblog/myAccount';
import myArtical from '../views/aboutMyblog/myArtical';
import searchArtical from '../views/aboutMyblog/searchArtical';
import login from "../views/login/login"
import regist from "../views/login/regist"
import articalEdit from "../views/articalOperation/edit";
import articalAdd from "../views/articalOperation/addArtical";
import addDraft from "../views/draftOperation/addDraft";
import editDraft from "../views/draftOperation/editDraft";
import SearchResult from "../views/searchResult";
import searchMy from "../views/aboutMyblog/searchMy"
Vue.use(VueRouter);

const routes = [
  {
    path:'/',
    redirect:'/Homepage',
  },
  {
    path:'/Homepage',
    name:'Homepage',
    component:Homepage
  },
  {
    path:'/Blog',
    name:'Blog',
    component:Blog
  },
  {
    path:'/Myblog1',
    name:'Myblog1',
    component:Myblog1
  },
  {
    path:'/Myblog2',
    name:'Myblog2',
    component:Myblog2
  },
  {
    path:'/Read',
    name:'Read',
    component:Read
  },
  {
    path:'/Read1',
    name:'Read1',
    component:Read1
  },
  {
    path:'/Read2',
    name:'Read2',
    component:Read2
  },
  {
    path:'/Read3',
    name:'Read3',
    component:Read3
  },
  {
    path:'/Read4',
    name:'Read4',
    component:Read4
  },
  {
    path:'/Read5',
    name:'Read5',
    component:Read5
  },
  {
    path:'/Read6',
    name:'Read6',
    component:Read6
  },
  {
    path:'/Read7',
    name:'Read7',
    component:Read7
  },
  {
    path:'/Show',
    name:'Show',
    component:Show
  },
  {
    path:"/concat",
    name:"Concat",
    component:concat
  },
 
  {
    path:"/myBlog",
    name:"MyBlog",
    component:myBlog,
    children:[
      {
        path:'myArtical',
        name:'MyArtical',
        component:myArtical
      },
      {
        path:'searchArtical',
        name:'SearchArtical',
        component:searchArtical
      },
      {
        path:'draftBox',
        name:'DraftBox',
        component:draftBox
      },
      {
        path:'myAccount',
        name:'MyAccount',
        component:myAccount
      },
      {
        path:"edit",
        name:"Edit",
        component:articalEdit
      },{
        path:"addArtical",
        name:"AddArtical",
        component:articalAdd
      },{
        path:"addDraft",
        name:"AddDraft",
        component:addDraft
      },
      {
        path:"editDraft",
        name:"EditDraft",
        component:editDraft
      },
      {
        path:"searchMy",
        name:"SearchMy",
        component:searchMy
      }
    ]
  },
  {
    path:'/login',
    name:"Login",
    component:login
  },
  {
    path:"/regist",
    name:"Regist",
    component:regist
  },
  {
    path:"/searchResult",
    name:"SearchResult",
    component:SearchResult
  }
  
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes
});

export default router;
